home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / COMM / INTERNET / MAIL / TRANSPORTS / taylor / CompPost < prev    next >
Text File  |  1994-09-19  |  2KB  |  53 lines

  1. | > DoPost
  2. |
  3. | Version for compressed news batches
  4. | Usage: DoPost <NewsServerAddress> <Filename>
  5. |
  6. | DoPost will queue the specified file for posting to News via the
  7. | specified NewsServer. It performs no error checking on the file, and
  8. | assumes that the file contains a valid header.
  9. |
  10. | This version of DoPost produces single, compressed news batches
  11. | for sending straight to the other end.
  12. |
  13. | Author:           Gunnar Zötl
  14. | Date:                17-Sep-1994
  15. | Last Modified:    19-Sep-1994
  16. |
  17. | We need some more memory than the non-compressing version
  18. |
  19. wimpslot -min 700K
  20. |
  21. | We create a temporary file in Wimp$ScrapDir, to which we compress the
  22. | article
  23. |
  24. set f <Wimp$ScrapDir>.DPtemp
  25. |
  26. | if you want to use gzip instead of compress, change cunbatch to zunbatch
  27. | and compress to gzip.
  28. |
  29. <obey$dir>.printto <f> #! cunbatch
  30. compress < %1 >> <f> 2> null:
  31. |
  32. | this gets around a problem with the C library, which sometimes seems
  33. | confused then receiving a <system$variable> together with I/O redirection.
  34. Set alias$DoPostIt Uux -r - %0!rnews < <f> 2> null:
  35. |
  36. | we assume that posting the article will succeed.
  37. |
  38. Set NewsBase$ReturnInfo Article posted
  39. DoPostIt
  40. Set NewsBase$ReturnCode <Sys$ReturnCode>
  41. |
  42. | If posting did not succeed, we alter the Info for NewsBase here.
  43. |
  44. If "<NewsBase$ReturnCode>" <> "0" Then Set NewsBase$ReturnInfo Posting failed
  45. |
  46. | now remove the file sendnews passed us, the temp. file, and unset the
  47. | helper environment variables
  48. |
  49. Remove %1
  50. Remove <f>
  51. unset f
  52. unset alias$DoPostIt
  53.